package com.eleven.trades.utils;
import org.springframework.util.DigestUtils;
/**
 * @author linhaizeng
 */
public class EncodeByMd5 {
    private static String salt = "eleven";

    public static String encode(String password) {
        String saltPassword=salt+"/"+password;
//        String salt = RandomStringUtils.randomAscii(12);
        String md5Password = DigestUtils.md5DigestAsHex(saltPassword.getBytes());
        return md5Password;
    }

    public static void main(String[] args) {
        System.out.println(encode("123456"));
    }
}
